Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mkcomposefs --from-file #215

Merged
merged 9 commits into from
Oct 12, 2023

Conversation

alexlarsson
Copy link
Collaborator

This supports creating a composefs image from a simple line-per-file format.

The format used is the same as the one that composefs-info dump generates, which allows conversion to from textual format. It is also a format that is very easy to produce and e.g. stream to mkcomposefs from other languages.

Even though very simple to generate and parse, the format is quite compact. For example, the f36-x86_64-silverblue.json.gz file is 33M uncompressed and generates a 19M composefs image. But the dump file for it is just 16M.

We want to use these in other places too.

Signed-off-by: Alexander Larsson <[email protected]>
This can be used to unset the current payload.

Signed-off-by: Alexander Larsson <[email protected]>
If there is no payload, we should print "-" not an escaped "-".

Signed-off-by: Alexander Larsson <[email protected]>
For nodes with inline data, include the content (escaped).

Signed-off-by: Alexander Larsson <[email protected]>
We need to follow link chains when checking this, because
none of the intermediate hardlinks are marked as in tree.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson
Copy link
Collaborator Author

@giuseppe I think containers/storage could generate this and stream it into mkcomposefs --from-file -.

This uses the format produced by composefs-info dump.

Signed-off-by: Alexander Larsson <[email protected]>
…ility

This is similar to the existing composefs-dump, but also tests the
dump + parse dump codepaths.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson alexlarsson force-pushed the mkcomposefs-from-dump branch from 0661db5 to 51c5156 Compare October 10, 2023 16:43
Also updates the other manpages to reference the new pages as needed.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson alexlarsson force-pushed the mkcomposefs-from-dump branch from 51c5156 to bf01505 Compare October 11, 2023 10:40
@alexlarsson
Copy link
Collaborator Author

Added some documentation too..

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@giuseppe giuseppe merged commit a2131b9 into containers:main Oct 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants